public class EffervescenceSort {

    public static void solution(int[] numbers){

        int[] temp=new int[numbers.length];

        for (int i = 0; i < temp.length; i++) {
            temp[i]=i;
        }

        for (int i = 0; i < numbers.length; i++) {
            for (int j = 0; j < numbers.length-1-i; j++) {
                if(numbers[j]>numbers[j+1]){
                    int a=temp[j];
                    temp[j]=temp[j+1];
                    temp[j+1]=a;
                }
            }
        }

        for (int i = 0; i < temp.length; i++) {
            System.out.println(numbers[temp[i]]);
        }

    }

    public static void main(String[] args) {
        solution(new int[]{1,2,4,5,3});
    }
}
